home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Source Code / Textures SDK / common / lbmlib.h < prev    next >
C/C++ Source or Header  |  1998-12-02  |  1KB  |  58 lines

  1. /***
  2. *
  3. *    Copyright (c) 1998, Valve LLC. All rights reserved.
  4. *    
  5. *    This product contains software technology licensed from Id 
  6. *    Software, Inc. ("Id Technology").  Id Technology (c) 1996 Id Software, Inc. 
  7. *    All Rights Reserved.
  8. *
  9. ****/
  10.  
  11. // lbmlib.h
  12.  
  13. typedef unsigned char    UBYTE;
  14.  
  15. #ifndef _WINDOWS_
  16. typedef short            WORD;
  17. #endif
  18.  
  19. typedef unsigned short    UWORD;
  20. typedef long            LONG;
  21.  
  22. typedef enum
  23. {
  24.     ms_none,
  25.     ms_mask,
  26.     ms_transcolor,
  27.     ms_lasso
  28. } mask_t;
  29.  
  30. typedef enum
  31. {
  32.     cm_none,
  33.     cm_rle1
  34. } compress_t;
  35.  
  36. typedef struct
  37. {
  38.     UWORD        w,h;
  39.     WORD        x,y;
  40.     UBYTE        nPlanes;
  41.     UBYTE        masking;
  42.     UBYTE        compression;
  43.     UBYTE        pad1;
  44.     UWORD        transparentColor;
  45.     UBYTE        xAspect,yAspect;
  46.     WORD        pageWidth,pageHeight;
  47. } bmhd_t;
  48.  
  49. extern    bmhd_t    bmhd;                        // will be in native byte order
  50.  
  51.  
  52. void LoadLBM (char *filename, byte **picture, byte **palette);
  53. int    LoadBMP (const char* szFile, byte** ppbBits, byte** ppbPalette);
  54. void WriteLBMfile (char *filename, byte *data, int width, int height
  55.     , byte *palette);
  56. int WriteBMPfile (char *szFile, byte *pbBits, int width, int height, byte *pbPalette);
  57.  
  58.